<?php
// +----------------------------------------------------------------------
// | 一起买好团
// +----------------------------------------------------------------------
// | Copyright (c) 2011 http://www.17mh.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: 吴锋(7462679@qq.com)
// +----------------------------------------------------------------------
// 基础文件
session_start();
ini_set('display_errors', 'On');
error_reporting( E_ALL & ~E_NOTICE);
header("Content-type:text/html;charset=UTF-8");
$GLOBALS['_start_time_'] = array_sum(explode(' ', microtime()));
if(version_compare(PHP_VERSION,'5.0.0','<'))  die('require PHP > 5.0 !');
define('MAGIC_QUOTES_GPC', get_magic_quotes_gpc());	// 检测系统是否开始魔术引用
define('SHARE_VERSION', 'V.2012');
define('SHARE_PATH', ROOT_PATH.'SharePHP/');
define('CACHE_PATH', ROOT_PATH.'Public/Caches/Sites/');
require_once(SHARE_PATH.'Config/Config.php');
// 引入公共函数库
require_once(SHARE_PATH.'Common/Common.php');
define('__SELF__', $_SERVER['SCRIPT_NAME'] ? $_SERVER['SCRIPT_NAME'] : $_SERVER['PHP_SELF']);
define('__URL__', __SELF__);
// 禁止对全局变量注入
if (isset($_REQUEST['GLOBALS']) or isset($_FILES['GLOBALS'])) {
	exit('Request tainting attempted.');
}
// 对GPC变量进行安全处理
if (!MAGIC_QUOTES_GPC){
	$_GET = ass($_GET);
	$_POST = ass($_POST);
	$_COOKIE = ass($_COOKIE);
	$_SESSION = ass($_SESSION);
	$_REQUEST = ass($_REQUEST);
	$_SERVER = ass($_SERVER);
	$_FILES = ass($_FILES);
}
$base	= new Base();
$base->init();
?>